<?php

namespace app\common\model;

use think\Model;

/**
 * 会员模型
 */
class ReserveRecord extends Model
{

    // 开启自动写入时间戳字段
    protected $autoWriteTimestamp = 'int';
    // 定义时间戳字段名
    protected $createTime = 'add_time';
    protected $updateTime = 'update_time';
    // 追加属性
    protected $append = [
        'url',
    ];

     public static function get_info($username, $sid)
    {
        $sms = \app\common\model\ReserveRecord::
        where(['nickname' => $username, 'sid' => $sid,'states'=>1])
            ->find();
        return $sms ? $sms : null;
    }

}
